package com.stone.framework.user.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.stone.framework.message.user.MenuResBody;
import com.stone.framework.message.user.ResourcePageReqBody;
import com.stone.framework.message.user.ResourcePageResBody;
import com.stone.framework.message.user.ResourceReqBody;
import com.stone.framework.message.user.ResourceTreeResBody;
import com.stone.framework.user.entity.Resource;

public interface ResourceService {

    List<ResourceTreeResBody> buildTree();

    List<MenuResBody> buildMenu(String username);

    /**
     * 通过{@link #buildTree()}查询
     */
    @Deprecated
    IPage<ResourcePageResBody> queryPage(ResourcePageReqBody reqBody, Page<Resource> page);

    void save(ResourceReqBody reqBody);

    void modify(ResourceReqBody reqBody);

    void delete(Long id);

}
